package com.simple.common.entity.req.info;

import com.simple.common.entity.req.vm.pay.ReqBase;
import lombok.Data;
import org.apache.commons.lang3.ArrayUtils;
import reactor.core.publisher.Flux;

import java.util.Map;
import java.util.function.Consumer;

/**
 * @author yasud
 * @date 2021年03月02日 14:36
 * @description
 */
@Data
public class InfoReqBase extends ReqBase {


    /**
     * 拓展字段
     */
    private Map<String, Object> extra;

    @Override
    protected void check(Consumer<ReqBase>... consumers) {
        if (ArrayUtils.isNotEmpty(consumers)) {
            Flux.fromArray(consumers).subscribe(v -> v.accept(this));
        }
    }
}
